<div class="banner">
	<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
		<ol class="carousel-indicators">
			<li data-target="#carouselExampleIndicators" data-slide-to="0">
			</li>
			<li data-target="#carouselExampleIndicators" data-slide-to="1"  class="active">
			</li>
			<li data-target="#carouselExampleIndicators" data-slide-to="2">
			</li>
		</ol>
		<div class="carousel-inner">
			<div class="carousel-item ">
				{if condition="isset($_COOKIE['think_var']) && $_COOKIE['think_var'] eq 'en'"}
					<img class="d-block w-100" src="__CDN__/home/images/banner 1英文版.png?t=1" alt="First slide">
				{else/}
					<img class="d-block w-100" src="__CDN__/home/images/banner 1.png?t=1" alt="First slide">
				{/if}
			</div>
			<div class="carousel-item active">
				{if condition="isset($_COOKIE['think_var']) && $_COOKIE['think_var'] eq 'en'"}
					<img class="d-block w-100" src="__CDN__/home/images/banner 2英文版.png?t=1" alt="First slide">
				{else/}
					<img class="d-block w-100" src="__CDN__/home/images/banner 2.png?t=1" alt="First slide">
				{/if}
			</div>
			<div class="carousel-item">
				{if condition="isset($_COOKIE['think_var']) && $_COOKIE['think_var'] eq 'en'"}
					<img class="d-block w-100" src="__CDN__/home/images/banner 3英文版.png?t=1" alt="First slide">
				{else/}
					<img class="d-block w-100" src="__CDN__/home/images/banner 3.png?t=1" alt="First slide">
				{/if}
			</div>
		</div>
	</div>
	</div>
</div>
<div class="productfeatures" style="margin-top:2rem;">
	<h3>
		{:__('Features')}
	</h3>
	<div class="h3line">
	</div>
	<div class="row justify-content-center" style="position:relative">
		<div class="col-12 col-sm-6">
			<div class="pdfeaturesbox">
				<img src="__CDN__/home/images/producttype_boxic1.png" class="box-icon"
				/>
				<div>
					{:__('Features Content 1')}
				</div>
			</div>
		</div>
		<div class="col-12 col-sm-6 col-right">
			<div class="pdfeaturesbox">
				<img src="__CDN__/home/images/producttype_boxic2.png" class="box-icon"
				/>
				<div>
					{:__('Features Content 2')}
				</div>
			</div>
		</div>
		<div class="col-12 col-sm-6">
			<div class="pdfeaturesbox">
				<img src="__CDN__/home/images/producttype_boxic3.png" class="box-icon"
				/>
				<div>
					{:__('Features Content 3')}
				</div>
			</div>
		</div>
		<div class="col-12 col-sm-6 col-right">
			<div class="pdfeaturesbox">
				<img src="__CDN__/home/images/producttype_boxic4.png" class="box-icon"
				/>
				<div>
					{:__('Features Content 4')}
				</div>
			</div>
		</div>
		<div class="product_lines">
		</div>
	</div>
	<div class="row justify-content-center" style="text-align:center;padding:0 5%;">
		<div class="col-6 col-sm-4">
			<div class="productfeaturesphonect">
				<img src="__CDN__/home/images/producttype_phonect1.png" />
			</div>
			<span class="productfeatures_txt">
				{:__('Product Type 1')}
			</span>
		</div>
		<div class="col-6 col-sm-4">
			<div class="productfeaturesphonect">
				<img src="__CDN__/home/images/producttype_phonect2.png" />
			</div>
			<span class="productfeatures_txt">
				{:__('Product Type 2')}
			</span>
		</div>
		<div class="col-6 col-sm-4">
			<div class="productfeaturesphonect">
				<img src="__CDN__/home/images/producttype_phonect3.png" />
			</div>
			<span class="productfeatures_txt">
				{:__('Product Type 3')}
			</span>
		</div>
		<div class="col-6 sm-display-none">
			<div class="productfeaturesphonect">
				<div>
					{:__('DeepQA')}
				</div>
			</div>
		</div>
	</div>
	<div class="productfeatures_body sm-display-block">
		{:__('DeepQA')}
	</div>
</div>
<div class="producttype">
	<h3>
		{:__('Product type')}
	</h3>
	<div class="h3line">
	</div>
	<div class="producttypebody">
		<div class="row justify-content-center">
			<div class="col-12 col-md-6 buy_ct_left">
				<div class="st_buy_ct">
					<div class="buy_ct_title">
						{:__('Standard account')}

					</div>
					<div class="buy_ct_body">
						{:__('Standard Service')}

						<div class="buy_button" id="buy_btn_1"  data-id="1">
							{:__('Buy Now')}
						</div>
					</div>
				</div>
			</div>
			<div class="col-12 col-md-6 buy_ct_right">
				<div class="st_buy_ct">
					<div class="buy_ct_title">
						{:__('Senior account')}

					</div>
					<div class="buy_ct_body">
						{:__('Senior Service')}

						<div class="buy_button" id="buy_btn_2" data-id="2">
							{:__('Buy Now')}
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<!-- Modal -->
<div class="modal fade " id="exampleModalLong" tabindex="-1" role="dialog"
aria-labelledby="exampleModalLongTitle" aria-hidden="true">
	<div class="modal-dialog order_dialog" role="document">
		<div class="modal-content">
			<div id="order_ct1">
				<div class="order_dialog_header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"
					aria-hidden="true">
					</button>
					<h5 class="modal-title">
						Order Confirm
					</h5>
				</div>
				<div class="modal-body">
					<div class="order_title">
						<img src="__CDN__/home/images/order_user_icon.png" />
						Standard account <span class="product_price"></span>/YEAR
					</div>
					<div class="pdl weight">
						Service
					</div>
					<div class="pdl" style="width:4rem;margin-top:0.5rem;">
						<div class="order_line">
						</div>
					</div>
					<div class="pdl mt1">
						<div class="order_line_content_1">
							{:__('Standard Service')}

						</div>
						<div class="order_line_content_2">
								{:__('Senior Service')}
						</div>
					</div>
					<div class="pdl mt1" style="margin-right:2rem;">
						<div class="order_line">
						</div>
					</div>
					<div class="pdl weight mt1">
						Method of payment
					</div>
					<div class="form-check pdl">
						<!-- <input type="radio" name="sex" value="male" checked>Male -->
						<input type="radio" checked name="wallet" value="btc" class="form-check-input wallet_check" id="exampleCheck1">
						<label class="form-check-label" for="exampleCheck1">
							Wallet transfer, support equivalent BTC.
						</label>
					</div>
					<div class="form-check pdl">
						<input type="radio" name="wallet" value="eth" class="form-check-input wallet_check" id="exampleCheck2">
						<label class="form-check-label" for="exampleCheck2">
							Wallet transfer, support equivalent ETH.
						</label>
					</div>
					<div style="text-align: center;">
						<div class="buy_button" style="position:static;margin:2rem auto;" id="order_config_btn1">
							confirm purchase
						</div>
					</div>
				</div>
			</div>
			<div id="order_ct2" style="display:none;">

				<div class="order_dialog_header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"
					aria-hidden="true">
					</button>
					<h5 class="modal-title">
						Payment
					</h5>
				</div>
				<div class="modal-body" style="">
					<div class="order_title">
						<img src="__CDN__/home/images/order_user_icon.png" />
						Standard account <span class="product_price"></span>/YEAR
					</div>
					<div class="pdl weight mt1">
						Method of payment
					</div>
					<div class="form-check pdl">
						<input type="radio" checked class="form-check-input" id="exampleCheck3">
						<label class="form-check-label" for="exampleCheck3">
							Wallet transfer, support equivalent <span class="product_price_unit"></span>.
						</label>
					</div>
					<div class="pdl mt1" style="margin-right:2rem;">
						<div class="order_line">
						</div>
					</div>
					<div class="pdl mt1 transfer_address">
						<!-- Please transfer to the following wallet address 1.0BTH -->
					</div>

					<div class="pdl mt1 wallet_address" style="background:#9e9f9f;color:#fff">
						BTC:38h1VJyVLZUKSZUK1Qx1hSkJLEQRg3x3uD
					</div>
					<div style="text-align: center;">
						<!-- <div class="buy_button" style="position:static;margin:2rem auto;" id="order_config_copy">
							Copy The Address
						</div> -->

						<input class="buy_button address border-radius text-center wallet_address_input" value="BTC:38h1VJyVLZUKSZUK1Qx1hSkJLEQRg3x3uD" style="opacity:0;"/>
                    	<a href="javascript:void(0);" class="copy text-center copy-btn" data-clipboard-action="copy" data-clipboard-target=".address" style="cursor: pointer;">Copy The Address</a>
					</div>



					<div style="text-align: center;">
						<a class="buy_button" style="position:static;color:#fff;margin-top:10px;" id="order_config_btn2">
							Successful Transfer
						</a>
					</div>
				</div>
			</div>
			<div id="order_ct3" style="display:none;">
				<div class="order_dialog_header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"
					aria-hidden="true">
					</button>
					<h5 class="modal-title">
						Order Confirm
					</h5>
				</div>
				<div class="modal-body" style="text-align:center">
					<div class="pdl mt1">
						The order is manually confirmed by
						<br/>
						the customer service
						<br/>
						and we will contact you after confirmation.
						<br/>
					</div>
					<div class="pdl mt1" style="margin-right:2rem;">
						<div class="order_line">
						</div>
					</div>
					<div class="pdl mt1">
						if the waiting time ios too long
						<br/>
						you can contact our Telegram:Official_TokenMan
					</div>
					<div style="text-align: center;">
						<div class="buy_button" style="position:static;margin:2rem auto;" id="order_config_btn3">
							ok
						</div>
					</div>
				</div>

			</div>


			<div id="order_ct4" style="display:none;">
				<div class="order_dialog_header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"
					aria-hidden="true">
					</button>
					<h5 class="modal-title">
						Contact
					</h5>
				</div>
				<div class="modal-body" style="text-align:center">
				<img src="__CDN__/home/images/1531303879159.jpg" alt="" style="width:50%;">

				</div>

			</div>
		</div>
	</div>
</div>
{include file="common/footer" /}
{include file="common/scripts" /}
<script type="text/javascript" src="http://m.name-technology.fun/Public/telegram/clipboard.js">
<script type="text/javascript" src="http://m.name-technology.fun/Public/telegram/layer.js">


</script>
<script>
	var product_id = 0;
	var wallet = 0;

	$('#order_config_btn1').click(function() {
		//$('#order_ct4').show();
		//获取选择的钱包
		//alert($("input[name='sex'][checked]").val())
		wallet = $("input[name='wallet']:checked").val();

		if (product_id == 1) {
			price = "0.5"
		}

		if (product_id == 2) {
			price = "1.0"
		}

		$(".product_price").text( price + wallet)
		$(".product_price_unit").text(wallet)

		//alert(product_id)
		// 		transfer_address
		// Please transfer to the following wallet address 1.0BTH
		if (wallet == "btc") {

			$(".wallet_address").text("BTC:38h1VJyVLZUKSZUK1Qx1hSkJLEQRg3x3uD");
			$(".wallet_address_input").val("BTC:38h1VJyVLZUKSZUK1Qx1hSkJLEQRg3x3uD");

		}

		if (wallet == "eth") {
			$(".wallet_address").text("0x3d55aac3325875c97c6149f617894b20e02b843c");
			$(".wallet_address_input").val("ETH:0x3d55aac3325875c97c6149f617894b20e02b843c");
		}



		$('.transfer_address').text("Please transfer to the following wallet address " + price + wallet)
		$('#order_ct1').hide();
		$('#order_ct2').show();
	});

	$('#order_config_btn2').click(function() {
		//进行下单操作
		 $.ajax({
	           type: "POST",
	           url: "{:url('order/confirm')}",
	           data: "product_id="+product_id+"&wallet="+wallet,
	           success: function (data) {
					var result  = JSON.parse(data)
					if (result.code === 0) {
						$('#order_ct2').hide();
						$('#order_ct3').show();
					}else{
						alert("Order fail~");
						return false;
					}
	           }

	       })
	});

	$('#order_config_btn3').click(function() {

		$('#order_ct3').hide();
		//跳转订单成功页面
		window.location.href="{:url('user/orderindex')}"
	});

	$('#buy_btn_2,#buy_btn_1').click(function() {
		var userInfo = <?php echo json_encode($_COOKIE)?>;
		if (userInfo['uid'] == "undefined" || userInfo['uid'] == undefined) {
			window.location.href="{:url('/index/user/login')}"
			return false;
		}
		//alert($(this).attr("data-id"))
		product_id = $(this).attr("data-id")

		if (product_id == 1) {
			price = "0.5"
			$(".order_line_content_1").show();
			$(".order_line_content_2").hide();
		}

		if (product_id == 2) {
			price = "1.0"
			$(".order_line_content_1").hide();
			$(".order_line_content_2").show();
		}

		$(".product_price").text( price + "BTC")

		$('#order_ct1').show();
		$('#order_ct2').hide();
		$('#order_ct3').hide();
		// $('#order_ct1').hide();
		// $('#order_ct4').show();
		$('#exampleModalLong').modal({});
	});

	var clipboard = new Clipboard('.copy-btn');

	clipboard.on('success', function(e) {
	    // layer.msg("复制成功!", {
	    //     shade: [0.8, '#000'],
	    //     time: 1000
	    // });
		alert("复制成功")
	});

	clipboard.on('error', function(e) {
	    // layer.msg("请选择“拷贝”进行复制!", {
	    //     shade: [0.8, '#000'],
	    //     time: 1000
	    // });、
		alert("请选择“拷贝”进行复制!")
	});
</script>
